<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>gui - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / gui<br />
  <a name="top"></a><h1>gui - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="gui.html" name="gui.txt">gui.txt</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2017 Jul 15<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Identifier">VIM REFERENCE MANUAL&nbsp;&nbsp;&nbsp;&nbsp;by Bram Moolenaar</span><br>
<br>
<br>
Vim's Graphical User Interface&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui" name="gui">gui</a>&nbsp;<a class="Constant" href="gui.html#GUI" name="GUI">GUI</a><br>
<br>
1. Starting the GUI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-start">gui-start</a><br>
2. Scrollbars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-scrollbars">gui-scrollbars</a><br>
3. Mouse Control&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-mouse">gui-mouse</a><br>
4. Making GUI Selections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-selections">gui-selections</a><br>
5. Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#menus">menus</a><br>
6. Extras&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-extras">gui-extras</a><br>
7. Shell Commands&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui.html#gui-shell">gui-shell</a><br>
<br>
Other GUI documentation:<br>
<a class="Identifier" href="gui_x11.html">gui_x11.txt</a>&nbsp;&nbsp; For specific items of the X11 GUI.<br>
<a class="Identifier" href="gui_w32.html">gui_w32.txt</a>&nbsp;&nbsp; For specific items of the Win32 GUI.<br>
<br>
<span class="Special">{Vi does not have any of these commands}</span><br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. Starting the GUI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-start" name="gui-start">gui-start</a>&nbsp;<a class="Constant" href="gui.html#E229" name="E229">E229</a>&nbsp;<a class="Constant" href="gui.html#E233" name="E233">E233</a><br>
<br>
First you must make sure you actually have a version of Vim with the GUI code<br>
included.&nbsp;&nbsp;You can check this with the &quot;:version&quot; command, it says &quot;with xxx<br>
GUI&quot;, where &quot;xxx&quot; is X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or<br>
&quot;MS-Windows 32 bit GUI version&quot;.<br>
<br>
How to start the GUI depends on the system used.&nbsp;&nbsp;Mostly you can run the<br>
GUI version of Vim with:<br>
&nbsp;&nbsp;&nbsp;&nbsp;gvim&nbsp;<span class="Special">[options]</span>&nbsp;[files...]<br>
<br>
The X11 version of Vim can run both in GUI and in non-GUI mode.&nbsp;&nbsp;See<br>
<a class="Identifier" href="gui_x11.html#gui-x11-start">gui-x11-start</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-init" name="gui-init">gui-init</a>&nbsp;<a class="Constant" href="gui.html#gvimrc" name="gvimrc">gvimrc</a>&nbsp;<a class="Constant" href="gui.html#.gvimrc" name=".gvimrc">.gvimrc</a>&nbsp;<a class="Constant" href="gui.html#_gvimrc" name="_gvimrc">_gvimrc</a>&nbsp;<a class="Constant" href="gui.html#$MYGVIMRC" name="$MYGVIMRC">$MYGVIMRC</a><br>
The gvimrc file is where GUI-specific startup commands should be placed.&nbsp;&nbsp;It<br>
is always sourced after the&nbsp;<a class="Identifier" href="starting.html#vimrc">vimrc</a>&nbsp;file.&nbsp;&nbsp;If you have one then the $MYGVIMRC<br>
environment variable has its name.<br>
<br>
When the GUI starts up initializations are carried out, in this order:<br>
- The&nbsp;<a class="Type" href="options.html#'term'">'term'</a>&nbsp;option is set to &quot;builtin_gui&quot; and terminal options are reset to<br>
&nbsp;&nbsp;their default value for the GUI&nbsp;<a class="Identifier" href="term.html#terminal-options">terminal-options</a>.<br>
- If the system menu file exists, it is sourced.&nbsp;&nbsp;The name of this file is<br>
&nbsp;&nbsp;normally &quot;$VIMRUNTIME/menu.vim&quot;.&nbsp;&nbsp;You can check this with &quot;:version&quot;.&nbsp;&nbsp;Also<br>
&nbsp;&nbsp;see&nbsp;<a class="Identifier" href="starting.html#$VIMRUNTIME">$VIMRUNTIME</a>.&nbsp;&nbsp;To skip loading the system menu include 'M' in<br>
&nbsp;&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#buffers-menu" name="buffers-menu">buffers-menu</a>&nbsp;<a class="Constant" href="gui.html#no_buffers_menu" name="no_buffers_menu">no_buffers_menu</a><br>
&nbsp;&nbsp;The system menu file includes a &quot;Buffers&quot; menu.&nbsp;&nbsp;If you don't want this, set<br>
&nbsp;&nbsp;the &quot;no_buffers_menu&quot; variable in your .vimrc (not .gvimrc!):<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:let no_buffers_menu = 1</div>
&nbsp;&nbsp;<span class="Todo">NOTE</span>: Switching on syntax highlighting also loads the menu file, thus<br>
&nbsp;&nbsp;disabling the Buffers menu must be done before &quot;:syntax on&quot;.<br>
&nbsp;&nbsp;The path names are truncated to 35 characters.&nbsp;&nbsp;You can truncate them at a<br>
&nbsp;&nbsp;different length, for example 50, like this:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:let bmenu_max_pathlen = 50</div>
- If the &quot;-U&nbsp;<span class="Special">{gvimrc}</span>&quot; command-line option has been used when starting Vim,<br>
&nbsp;&nbsp;the&nbsp;<span class="Special">{gvimrc}</span>&nbsp;file will be read for initializations.&nbsp;&nbsp;The following<br>
&nbsp;&nbsp;initializations are skipped.&nbsp;&nbsp;When&nbsp;<span class="Special">{gvimrc}</span>&nbsp;is &quot;NONE&quot; no file will be read<br>
&nbsp;&nbsp;for initializations.<br>
- For Unix and MS-Windows, if the system gvimrc exists, it is sourced.&nbsp;&nbsp;The<br>
&nbsp;&nbsp;name of this file is normally &quot;$VIM/gvimrc&quot;.&nbsp;&nbsp;You can check this with<br>
&nbsp;&nbsp;&quot;:version&quot;.&nbsp;&nbsp;Also see&nbsp;<a class="Identifier" href="starting.html#$VIM">$VIM</a>.<br>
- The following are tried, and only the first one that exists is used:<br>
&nbsp;&nbsp;- If the GVIMINIT environment variable exists and is not empty, it is<br>
&nbsp;&nbsp;&nbsp;&nbsp;executed as an Ex command.<br>
&nbsp;&nbsp;- If the user gvimrc file exists, it is sourced.&nbsp;&nbsp;The name of this file is<br>
&nbsp;&nbsp;&nbsp;&nbsp;normally &quot;$HOME/.gvimrc&quot;.&nbsp;&nbsp;You can check this with &quot;:version&quot;.<br>
&nbsp;&nbsp;- For Win32, when $HOME is not set, &quot;$VIM\_gvimrc&quot; is used.<br>
&nbsp;&nbsp;- When a &quot;_gvimrc&quot; file is not found, &quot;.gvimrc&quot; is tried too.&nbsp;&nbsp;And vice<br>
&nbsp;&nbsp;&nbsp;&nbsp;versa.<br>
&nbsp;&nbsp;The name of the first file found is stored in $MYGVIMRC, unless it was<br>
&nbsp;&nbsp;already set.<br>
- If the&nbsp;<a class="Type" href="options.html#'exrc'">'exrc'</a>&nbsp;option is set (which is NOT the default) the file ./.gvimrc<br>
&nbsp;&nbsp;is sourced, if it exists and isn't the same file as the system or user<br>
&nbsp;&nbsp;gvimrc file.&nbsp;&nbsp;If this file is not owned by you, some security restrictions<br>
&nbsp;&nbsp;apply.&nbsp;&nbsp;When &quot;.gvimrc&quot; is not found, &quot;_gvimrc&quot; is tried too.&nbsp;&nbsp;For Macintosh<br>
&nbsp;&nbsp;and DOS/Win32 &quot;_gvimrc&quot; is tried first.<br>
<br>
<span class="Todo">NOTE</span>: All but the first one are not carried out if Vim was started with<br>
&quot;-u NONE&quot; or &quot;-u DEFAULTS&quot; and no &quot;-U&quot; argument was given, or when started<br>
with &quot;-U NONE&quot;.<br>
<br>
All this happens AFTER the normal Vim initializations, like reading your<br>
.vimrc file.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="starting.html#initialization">initialization</a>.<br>
But the GUI window is only opened after all the initializations have been<br>
carried out.&nbsp;&nbsp;If you want some commands to be executed just after opening the<br>
GUI window, use the&nbsp;<a class="Identifier" href="autocmd.html#GUIEnter">GUIEnter</a>&nbsp;autocommand event.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:autocmd GUIEnter * winpos 100 50</div>
<br>
You can use the gvimrc files to set up your own customized menus (see&nbsp;<a class="Identifier" href="gui.html#:menu">:menu</a>)<br>
and initialize other things that you may want to set up differently from the<br>
terminal version.<br>
<br>
Recommended place for your personal GUI initializations:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$HOME/.gvimrc or $HOME/.vim/gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OS/2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$HOME/.gvimrc, $HOME/vimfiles/gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or $VIM/.gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MS-DOS and Win32&nbsp;&nbsp;&nbsp;&nbsp;$HOME/_gvimrc, $HOME/vimfiles/gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or $VIM/_gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Amiga&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or $VIM/.gvimrc<br>
<br>
The personal initialization files are searched in the order specified above<br>
and only the first one that is found is read.<br>
<br>
There are a number of options which only have meaning in the GUI version of<br>
Vim.&nbsp;&nbsp;These are&nbsp;<a class="Type" href="options.html#'guicursor'">'guicursor'</a>,&nbsp;<a class="Type" href="options.html#'guifont'">'guifont'</a>,&nbsp;<a class="Type" href="options.html#'guipty'">'guipty'</a>&nbsp;and&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.&nbsp;&nbsp;They are<br>
documented in&nbsp;<a class="Identifier" href="options.html">options.txt</a>&nbsp;with all the other options.<br>
<br>
If using the Motif or Athena version of the GUI (but not for the GTK+ or<br>
Win32 version), a number of X resources are available.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="gui_x11.html#gui-resources">gui-resources</a>.<br>
<br>
Another way to set the colors for different occasions is with highlight<br>
groups.&nbsp;&nbsp;The &quot;Normal&quot; group is used to set the background and foreground<br>
colors.&nbsp;&nbsp;Example (which looks nice):<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:highlight Normal guibg=grey90</div>
<br>
The &quot;guibg&quot; and &quot;guifg&quot; settings override the normal background and<br>
foreground settings.&nbsp;&nbsp;The other settings for the Normal highlight group are<br>
not used.&nbsp;&nbsp;Use the&nbsp;<a class="Type" href="options.html#'guifont'">'guifont'</a>&nbsp;option to set the font.<br>
<br>
Also check out the&nbsp;<a class="Type" href="options.html#'guicursor'">'guicursor'</a>&nbsp;option, to set the colors for the cursor in<br>
various modes.<br>
<br>
Vim tries to make the window fit on the screen when it starts up.&nbsp;&nbsp;This avoids<br>
that you can't see part of it.&nbsp;&nbsp;On the X Window System this requires a bit of<br>
guesswork.&nbsp;&nbsp;You can change the height that is used for the window title and a<br>
task bar with the&nbsp;<a class="Type" href="options.html#'guiheadroom'">'guiheadroom'</a>&nbsp;option.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:winp" name=":winp">:winp</a>&nbsp;<a class="Constant" href="gui.html#:winpos" name=":winpos">:winpos</a>&nbsp;<a class="Constant" href="gui.html#E188" name="E188">E188</a><br>
:winp[os]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Display current position of the top left corner of the GUI vim<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window in pixels.&nbsp;&nbsp;Does not work in all versions.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Also see&nbsp;<a class="Identifier" href="eval.html#getwinposx()">getwinposx()</a>&nbsp;and&nbsp;<a class="Identifier" href="eval.html#getwinposy()">getwinposy()</a>.<br>
<br>
:winp[os]&nbsp;<span class="Special">{X}</span>&nbsp;<span class="Special">{Y}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#E466" name="E466">E466</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put the GUI vim window at the given&nbsp;<span class="Special">{X}</span>&nbsp;and&nbsp;<span class="Special">{Y}</span>&nbsp;coordinates.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The coordinates should specify the position in pixels of the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top left corner of the window.&nbsp;&nbsp;Does not work in all versions.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does work in an (new) xterm&nbsp;<a class="Identifier" href="syntax.html#xterm-color">xterm-color</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When the GUI window has not been opened yet, the values are<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remembered until the window is opened.&nbsp;&nbsp;The position is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adjusted to make the window fit on the screen (if possible).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:win" name=":win">:win</a>&nbsp;<a class="Constant" href="gui.html#:winsize" name=":winsize">:winsize</a>&nbsp;<a class="Constant" href="gui.html#E465" name="E465">E465</a><br>
:win[size]&nbsp;<span class="Special">{width}</span>&nbsp;<span class="Special">{height}</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the window height to&nbsp;<span class="Special">{width}</span>&nbsp;by&nbsp;<span class="Special">{height}</span>&nbsp;characters.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obsolete, use &quot;:set lines=11 columns=22&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you get less lines than expected, check the&nbsp;<a class="Type" href="options.html#'guiheadroom'">'guiheadroom'</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;option.<br>
<br>
If you are running the X Window System, you can get information about the<br>
window Vim is running in with these commands:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:!xwininfo -id $WINDOWID<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:!xprop -id $WINDOWID<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:execute '!xwininfo -id ' . v:windowid<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:execute '!xprop -id ' . v:windowid</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-IME" name="gui-IME">gui-IME</a>&nbsp;<a class="Constant" href="gui.html#iBus" name="iBus">iBus</a><br>
Input methods for international characters in X that rely on the XIM<br>
framework, most notably iBus, have been known to produce undesirable results<br>
in gVim. These may include an inability to enter spaces, or long delays<br>
between typing a character and it being recognized by the application.<br>
<br>
One workaround that has been successful, for unknown reasons, is to prevent<br>
gvim from forking into the background by starting it with the&nbsp;<a class="Identifier" href="starting.html#-f">-f</a>&nbsp;argument.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. Scrollbars&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-scrollbars" name="gui-scrollbars">gui-scrollbars</a><br>
<br>
There are vertical scrollbars and a horizontal scrollbar.&nbsp;&nbsp;You may<br>
configure which ones appear with the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;option.<br>
<br>
The interface looks like this (with &quot;:set guioptions=mlrb&quot;):<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +------------------------------+&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | File&nbsp;&nbsp;Edit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Help | &lt;- Menu bar (m)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+--------------------------+-+&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |^|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|^|&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |#| Text area.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |#|&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| |&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |v|__________________________|v|&nbsp;<br>
&nbsp;Normal status line -&gt; |-+ File.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5,2&nbsp;&nbsp;+-|&nbsp;<br>
&nbsp;between Vim windows&nbsp;&nbsp; |^|&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;|^|&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| |&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | | Another file buffer.&nbsp;&nbsp;&nbsp;&nbsp; | |&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| |&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |#|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|#|&nbsp;<br>
&nbsp;Left scrollbar (l) -&gt; |#|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|#| &lt;- Right&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |#|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|#|&nbsp;&nbsp;&nbsp;&nbsp;scrollbar (r)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| |&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |v|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|v|&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+--------------------------+-+&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |&lt; ####&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;| | &lt;- Bottom&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+--------------------------+-+&nbsp;&nbsp;&nbsp;&nbsp;scrollbar (b)&nbsp;<br>
<br>
Any of the scrollbar or menu components may be turned off by not putting the<br>
appropriate letter in the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;string.&nbsp;&nbsp;The bottom scrollbar is<br>
only useful when&nbsp;<a class="Type" href="options.html#'nowrap'">'nowrap'</a>&nbsp;is set.<br>
<br>
<br>
<span class="Statement">VERTICAL SCROLLBARS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a class="Constant" href="gui.html#gui-vert-scroll" name="gui-vert-scroll">gui-vert-scroll</a><br>
<br>
Each Vim window has a scrollbar next to it which may be scrolled up and down<br>
to move through the text in that buffer.&nbsp;&nbsp;The size of the scrollbar-thumb<br>
indicates the fraction of the buffer which can be seen in the window.<br>
When the scrollbar is dragged all the way down, the last line of the file<br>
will appear in the top of the window.<br>
<br>
If a window is shrunk to zero height (by the growth of another window) its<br>
scrollbar disappears.&nbsp;&nbsp;It reappears when the window is restored.<br>
<br>
If a window is vertically split, it will get a scrollbar when it is the<br>
current window and when, taking the middle of the current window and drawing a<br>
vertical line, this line goes through the window.<br>
When there are scrollbars on both sides, and the middle of the current window<br>
is on the left half, the right scrollbar column will contain scrollbars for<br>
the rightmost windows.&nbsp;&nbsp;The same happens on the other side.<br>
<br>
<br>
<span class="Statement">HORIZONTAL SCROLLBARS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a class="Constant" href="gui.html#gui-horiz-scroll" name="gui-horiz-scroll">gui-horiz-scroll</a><br>
<br>
The horizontal scrollbar (at the bottom of the Vim GUI) may be used to<br>
scroll text sideways when the&nbsp;<a class="Type" href="options.html#'wrap'">'wrap'</a>&nbsp;option is turned off.&nbsp;&nbsp;The<br>
scrollbar-thumb size is such that the text of the longest visible line may be<br>
scrolled as far as possible left and right.&nbsp;&nbsp;The cursor is moved when<br>
necessary, it must remain on a visible character (unless&nbsp;<a class="Type" href="options.html#'virtualedit'">'virtualedit'</a>&nbsp;is<br>
set).<br>
<br>
Computing the length of the longest visible line takes quite a bit of<br>
computation, and it has to be done every time something changes.&nbsp;&nbsp;If this<br>
takes too much time or you don't like the cursor jumping to another line,<br>
include the 'h' flag in&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.&nbsp;&nbsp;Then the scrolling is limited by the<br>
text of the current cursor line.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#athena-intellimouse" name="athena-intellimouse">athena-intellimouse</a><br>
If you have an Intellimouse and an X server that supports using the wheel,<br>
then you can use the wheel to scroll the text up and down in gvim.&nbsp;&nbsp;This works<br>
with XFree86 4.0 and later, and with some older versions when you add patches.<br>
See&nbsp;<a class="Identifier" href="scroll.html#scroll-mouse-wheel">scroll-mouse-wheel</a>.<br>
<br>
For older versions of XFree86 you must patch your X server.&nbsp;&nbsp;The following<br>
page has a bit of information about using the Intellimouse on Linux as well as<br>
links to the patches and X server binaries (may not have the one you need<br>
though):<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Constant"><a href="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">http://www.inria.fr/koala/colas/mouse-wheel-scroll/</a></span><br>
<br>
<span class="PreProc">==============================================================================</span><br>
3. Mouse Control&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse" name="gui-mouse">gui-mouse</a><br>
<br>
The mouse only works if the appropriate flag in the&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;option is set.<br>
When the GUI is switched on, and&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;wasn't set yet, the&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;option is<br>
automatically set to &quot;a&quot;, enabling it for all modes except for the<br>
<a class="Identifier" href="message.html#hit-enter">hit-enter</a>&nbsp;prompt.&nbsp;&nbsp;If you don't want this, a good place to change the<br>
<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;option is the &quot;gvimrc&quot; file.<br>
<br>
Other options that are relevant:<br>
<a class="Type" href="options.html#'mousefocus'">'mousefocus'</a>&nbsp;&nbsp;&nbsp;&nbsp;window focus follows mouse pointer&nbsp;<a class="Identifier" href="gui.html#gui-mouse-focus">gui-mouse-focus</a><br>
<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;&nbsp;&nbsp;&nbsp;what mouse button does which action<br>
<a class="Type" href="options.html#'mousehide'">'mousehide'</a>&nbsp;&nbsp;&nbsp;&nbsp; hide mouse pointer while typing text<br>
<a class="Type" href="options.html#'selectmode'">'selectmode'</a>&nbsp;&nbsp;&nbsp;&nbsp;whether to start Select mode or Visual mode<br>
<br>
A quick way to set these is with the &quot;:behave&quot; command.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:behave" name=":behave">:behave</a>&nbsp;<a class="Constant" href="gui.html#:be" name=":be">:be</a><br>
:be[have]&nbsp;<span class="Special">{model}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set behavior for mouse and selection.&nbsp;&nbsp;Valid<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arguments are:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mswin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MS-Windows behavior<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xterm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Xterm behavior<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Using &quot;:behave&quot; changes these options:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">option&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mswin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xterm</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'selectmode'">'selectmode'</a>&nbsp;&nbsp;&nbsp;&nbsp;&quot;mouse,key&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;&nbsp;&nbsp;&nbsp;&quot;popup&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;extend&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'keymodel'">'keymodel'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;startsel,stopsel&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'selection'">'selection'</a>&nbsp;&nbsp;&nbsp;&nbsp; &quot;exclusive&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;inclusive&quot;<br>
<br>
In the $VIMRUNTIME directory, there is a script called&nbsp;<a class="Identifier" href="gui_w32.html#mswin.vim">mswin.vim</a>, which will<br>
also map a few keys to the MS-Windows cut/copy/paste commands.&nbsp;&nbsp;This is NOT<br>
compatible, since it uses the&nbsp;<span class="Special">CTRL-V</span>,&nbsp;<span class="Special">CTRL-X</span>&nbsp;and&nbsp;<span class="Special">CTRL-C</span>&nbsp;keys.&nbsp;&nbsp;If you don't<br>
mind, use this command:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:so $VIMRUNTIME/mswin.vim</div>
<br>
For scrolling with a wheel on a mouse, see&nbsp;<a class="Identifier" href="scroll.html#scroll-mouse-wheel">scroll-mouse-wheel</a>.<br>
<br>
<br>
3.1 Moving Cursor with Mouse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-move" name="gui-mouse-move">gui-mouse-move</a><br>
<br>
Click the left mouse button somewhere in a text buffer where you want the<br>
cursor to go, and it does!<br>
<span class="PreProc">This works in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when 'mouse' contains</span><br>
Normal mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'n' or 'a'<br>
Visual mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'v' or 'a'<br>
Insert mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'i' or 'a'<br>
<br>
Select mode is handled like Visual mode.<br>
<br>
You may use this with an operator such as 'd' to delete text from the current<br>
cursor position to the position you point to with the mouse.&nbsp;&nbsp;That is, you hit<br>
'd' and then click the mouse somewhere.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-focus" name="gui-mouse-focus">gui-mouse-focus</a><br>
The&nbsp;<a class="Type" href="options.html#'mousefocus'">'mousefocus'</a>&nbsp;option can be set to make the keyboard focus follow the<br>
mouse pointer.&nbsp;&nbsp;This means that the window where the mouse pointer is, is the<br>
active window.&nbsp;&nbsp;Warning: this doesn't work very well when using a menu,<br>
because the menu command will always be applied to the top window.<br>
<br>
If you are on the ':' line (or '/' or '?'), then clicking the left or right<br>
mouse button will position the cursor on the ':' line (if&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;contains<br>
'c', 'a' or 'A').<br>
<br>
In any situation the middle mouse button may be clicked to paste the current<br>
selection.<br>
<br>
<br>
3.2 Selection with Mouse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-select" name="gui-mouse-select">gui-mouse-select</a><br>
<br>
The mouse can be used to start a selection.&nbsp;&nbsp;How depends on the&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a><br>
option:<br>
<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is &quot;extend&quot;: use the right mouse button<br>
<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is &quot;popup&quot;:&nbsp;&nbsp;use the left mouse button, while keeping the Shift<br>
key pressed.<br>
<br>
If there was no selection yet, this starts a selection from the old cursor<br>
position to the position pointed to with the mouse.&nbsp;&nbsp;If there already is a<br>
selection then the closest end will be extended.<br>
<br>
If&nbsp;<a class="Type" href="options.html#'selectmode'">'selectmode'</a>&nbsp;contains &quot;mouse&quot;, then the selection will be in Select mode.<br>
This means that typing normal text will replace the selection.&nbsp;&nbsp;See<br>
<a class="Identifier" href="visual.html#Select-mode">Select-mode</a>.&nbsp;&nbsp;Otherwise, the selection will be in Visual mode.<br>
<br>
Double clicking may be done to make the selection word-wise, triple clicking<br>
makes it line-wise, and quadruple clicking makes it rectangular block-wise.<br>
<br>
See&nbsp;<a class="Identifier" href="gui.html#gui-selections">gui-selections</a>&nbsp;on how the selection is used.<br>
<br>
<br>
3.3 Other Text Selection with Mouse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-modeless" name="gui-mouse-modeless">gui-mouse-modeless</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#modeless-selection" name="modeless-selection">modeless-selection</a><br>
A different kind of selection is used when:<br>
- in Command-line mode<br>
- in the Command-line window and pointing in another window<br>
- at the&nbsp;<a class="Identifier" href="message.html#hit-enter">hit-enter</a>&nbsp;prompt<br>
- whenever the current mode is not in the&nbsp;<a class="Type" href="options.html#'mouse'">'mouse'</a>&nbsp;option<br>
- when holding the CTRL and SHIFT keys in the GUI<br>
<br>
Since Vim continues like the selection isn't there, and there is no mode<br>
associated with the selection, this is called modeless selection.&nbsp;&nbsp;Any text in<br>
the Vim window can be selected.&nbsp;&nbsp;Select the text by pressing the left mouse<br>
button at the start, drag to the end and release.&nbsp;&nbsp;To extend the selection,<br>
use the right mouse button when&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is &quot;extend&quot;, or the left mouse<br>
button with the shift key pressed when&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is &quot;popup&quot;.<br>
The selection is removed when the selected text is scrolled or changed.<br>
<br>
On the command line&nbsp;<span class="Special">CTRL-Y</span>&nbsp;can be used to copy the selection into the<br>
clipboard.&nbsp;&nbsp;To do this from Insert mode, use&nbsp;<span class="Special">CTRL-O</span>&nbsp;:&nbsp;<span class="Special">CTRL-Y</span>&nbsp;<span class="Special">&lt;CR&gt;</span>.&nbsp;&nbsp;When<br>
<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;contains a or A (default on X11), the selection is automatically<br>
copied to the &quot;* register.<br>
<br>
The middle mouse button can then paste the text.&nbsp;&nbsp;On non-X11 systems, you can<br>
use&nbsp;<span class="Special">CTRL-R</span>&nbsp;+.<br>
<br>
<br>
3.4 Using Mouse on Status Lines&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-status" name="gui-mouse-status">gui-mouse-status</a><br>
<br>
Clicking the left or right mouse button on the status line below a Vim<br>
window makes that window the current window.&nbsp;&nbsp;This actually happens on button<br>
release (to be able to distinguish a click from a drag action).<br>
<br>
With the left mouse button a status line can be dragged up and down, thus<br>
resizing the windows above and below it.&nbsp;&nbsp;This does not change window focus.<br>
<br>
The same can be used on the vertical separator: click to give the window left<br>
of it focus, drag left and right to make windows wider and narrower.<br>
<br>
<br>
3.5 Various Mouse Clicks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-various" name="gui-mouse-various">gui-mouse-various</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;S-LeftMouse&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Search forward for the word under the mouse click.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is &quot;popup&quot; this starts or extends a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selection.<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;S-RightMouse&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search backward for the word under the mouse click.<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-LeftMouse&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jump to the tag name under the mouse click.<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-RightMouse&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jump back to position before the previous tag jump<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(same as &quot;<span class="Special">CTRL-T</span>&quot;)<br>
<br>
<br>
3.6 Mouse Mappings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-mouse-mapping" name="gui-mouse-mapping">gui-mouse-mapping</a><br>
<br>
The mouse events, complete with modifiers, may be mapped.&nbsp;&nbsp;Eg:<br>
<div class="helpExample">&nbsp;&nbsp; :map &lt;S-LeftMouse&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;RightMouse&gt;<br>
&nbsp;&nbsp; :map &lt;S-LeftDrag&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;RightDrag&gt;<br>
&nbsp;&nbsp; :map &lt;S-LeftRelease&gt;&nbsp;&nbsp; &lt;RightRelease&gt;<br>
&nbsp;&nbsp; :map &lt;2-S-LeftMouse&gt;&nbsp;&nbsp; &lt;2-RightMouse&gt;<br>
&nbsp;&nbsp; :map &lt;2-S-LeftDrag&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;2-RightDrag&gt;<br>
&nbsp;&nbsp; :map &lt;2-S-LeftRelease&gt; &lt;2-RightRelease&gt;<br>
&nbsp;&nbsp; :map &lt;3-S-LeftMouse&gt;&nbsp;&nbsp; &lt;3-RightMouse&gt;<br>
&nbsp;&nbsp; :map &lt;3-S-LeftDrag&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;3-RightDrag&gt;<br>
&nbsp;&nbsp; :map &lt;3-S-LeftRelease&gt; &lt;3-RightRelease&gt;<br>
&nbsp;&nbsp; :map &lt;4-S-LeftMouse&gt;&nbsp;&nbsp; &lt;4-RightMouse&gt;<br>
&nbsp;&nbsp; :map &lt;4-S-LeftDrag&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;4-RightDrag&gt;<br>
&nbsp;&nbsp; :map &lt;4-S-LeftRelease&gt; &lt;4-RightRelease&gt;</div>
These mappings make selection work the way it probably should in a Motif<br>
application, with shift-left mouse allowing for extending the visual area<br>
rather than the right mouse button.<br>
<br>
Mouse mapping with modifiers does not work for modeless selection.<br>
<br>
<br>
3.7 Drag and drop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#drag-n-drop" name="drag-n-drop">drag-n-drop</a><br>
<br>
You can drag and drop one or more files into the Vim window, where they will<br>
be opened as if a&nbsp;<a class="Identifier" href="windows.html#:drop">:drop</a>&nbsp;command was used.<br>
<br>
If you hold down Shift while doing this, Vim changes to the first dropped<br>
file's directory.&nbsp;&nbsp;If you hold Ctrl Vim will always split a new window for the<br>
file.&nbsp;&nbsp;Otherwise it's only done if the current buffer has been changed.<br>
<br>
You can also drop a directory on Vim.&nbsp;&nbsp;This starts the explorer plugin for<br>
that directory (assuming it was enabled, otherwise you'll get an error<br>
message).&nbsp;&nbsp;Keep Shift pressed to change to the directory instead.<br>
<br>
If Vim happens to be editing a command line, the names of the dropped files<br>
and directories will be inserted at the cursor.&nbsp;&nbsp;This allows you to use these<br>
names with any Ex command.&nbsp;&nbsp;Special characters (space, tab, double quote and<br>
'|'; backslash on non-MS-Windows systems) will be escaped.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. Making GUI Selections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-selections" name="gui-selections">gui-selections</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#quotestar" name="quotestar">quotestar</a><br>
You may make selections with the mouse (see&nbsp;<a class="Identifier" href="gui.html#gui-mouse-select">gui-mouse-select</a>), or by using<br>
Vim's Visual mode (see&nbsp;<a class="Identifier" href="visual.html#v">v</a>).&nbsp;&nbsp;If 'a' is present in&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>, then<br>
whenever a selection is started (Visual or Select mode), or when the selection<br>
is changed, Vim becomes the owner of the windowing system's primary selection<br>
(on MS-Windows the&nbsp;<a class="Identifier" href="gui_w32.html#gui-clipboard">gui-clipboard</a>&nbsp;is used; under X11, the&nbsp;<a class="Identifier" href="gui_x11.html#x11-selection">x11-selection</a>&nbsp;is<br>
used - you should read whichever of these is appropriate now).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#clipboard" name="clipboard">clipboard</a><br>
There is a special register for storing this selection, it is the &quot;*<br>
register.&nbsp;&nbsp;Nothing is put in here unless the information about what text is<br>
selected is about to change (e.g. with a left mouse click somewhere), or when<br>
another application wants to paste the selected text.&nbsp;&nbsp;Then the text is put<br>
in the &quot;* register.&nbsp;&nbsp;For example, to cut a line and make it the current<br>
selection/put it on the clipboard:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;*dd</div>
<br>
Similarly, when you want to paste a selection from another application, e.g.,<br>
by clicking the middle mouse button, the selection is put in the &quot;* register<br>
first, and then&nbsp;<span class="MissingTag">'put'</span>&nbsp;like any other register.&nbsp;&nbsp;For example, to put the<br>
selection (contents of the clipboard):<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;*p</div>
<br>
When using this register under X11, also see&nbsp;<a class="Identifier" href="gui_x11.html#x11-selection">x11-selection</a>.&nbsp;&nbsp;This also<br>
explains the related &quot;+ register.<br>
<br>
<span class="Todo">Note</span>&nbsp;that when pasting text from one Vim into another separate Vim, the type<br>
of selection (character, line, or block) will also be copied.&nbsp;&nbsp;For other<br>
applications the type is always character.&nbsp;&nbsp;However, if the text gets<br>
transferred via the&nbsp;<a class="Identifier" href="gui_x11.html#x11-cut-buffer">x11-cut-buffer</a>, the selection type is ALWAYS lost.<br>
<br>
When the &quot;unnamed&quot; string is included in the&nbsp;<a class="Type" href="options.html#'clipboard'">'clipboard'</a>&nbsp;option, the unnamed<br>
register is the same as the &quot;* register.&nbsp;&nbsp;Thus you can yank to and paste the<br>
selection without prepending &quot;* to commands.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
5. Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#menus" name="menus">menus</a><br>
<br>
For an introduction see&nbsp;<a class="Identifier" href="usr_42.html">usr_42.txt</a>&nbsp;in the user manual.<br>
<br>
<br>
5.1 Using Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#using-menus" name="using-menus">using-menus</a><br>
<br>
Basically, menus can be used just like mappings.&nbsp;&nbsp;You can define your own<br>
menus, as many as you like.<br>
Long-time Vim users won't use menus much.&nbsp;&nbsp;But the power is in adding your own<br>
menus and menu items.&nbsp;&nbsp;They are most useful for things that you can't remember<br>
what the key sequence was.<br>
<br>
For creating menus in a different language, see&nbsp;<a class="Identifier" href="mlang.html#:menutrans">:menutrans</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#menu.vim" name="menu.vim">menu.vim</a><br>
The default menus are read from the file &quot;$VIMRUNTIME/menu.vim&quot;.&nbsp;&nbsp;See<br>
<a class="Identifier" href="starting.html#$VIMRUNTIME">$VIMRUNTIME</a>&nbsp;for where the path comes from.&nbsp;&nbsp;You can set up your own menus.<br>
Starting off with the default set is a good idea.&nbsp;&nbsp;You can add more items, or,<br>
if you don't like the defaults at all, start with removing all menus<br>
<a class="Identifier" href="gui.html#:unmenu-all">:unmenu-all</a>.&nbsp;&nbsp;You can also avoid the default menus being loaded by adding<br>
this line to your .vimrc file (NOT your .gvimrc file!):<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:let did_install_default_menus = 1</div>
If you also want to avoid the Syntax menu:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:let did_install_syntax_menu = 1</div>
The first item in the Syntax menu can be used to show all available filetypes<br>
in the menu (which can take a bit of time to load).&nbsp;&nbsp;If you want to have all<br>
filetypes already present at startup, add:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:let do_syntax_sel_menu = 1</div>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#console-menus" name="console-menus">console-menus</a><br>
Although this documentation is in the GUI section, you can actually use menus<br>
in console mode too.&nbsp;&nbsp;You will have to load&nbsp;<a class="Identifier" href="gui.html#menu.vim">menu.vim</a>&nbsp;explicitly then, it is<br>
not done by default.&nbsp;&nbsp;You can use the&nbsp;<a class="Identifier" href="gui.html#:emenu">:emenu</a>&nbsp;command and command-line<br>
completion with&nbsp;<a class="Type" href="options.html#'wildmenu'">'wildmenu'</a>&nbsp;to access the menu entries almost like a real menu<br>
system.&nbsp;&nbsp;To do this, put these commands in your .vimrc file:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:source $VIMRUNTIME/menu.vim<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set wildmenu<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set cpo-=&lt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set wcm=&lt;C-Z&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:map &lt;F4&gt; :emenu &lt;C-Z&gt;</div>
Pressing&nbsp;<span class="Special">&lt;F4&gt;</span>&nbsp;will start the menu.&nbsp;&nbsp;You can now use the cursor keys to select<br>
a menu entry.&nbsp;&nbsp;Hit&nbsp;<span class="Special">&lt;Enter&gt;</span>&nbsp;to execute it.&nbsp;&nbsp;Hit&nbsp;<span class="Special">&lt;Esc&gt;</span>&nbsp;if you want to cancel.<br>
This does require the&nbsp;<a class="Identifier" href="various.html#+menu">+menu</a>&nbsp;feature enabled at compile time.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#tear-off-menus" name="tear-off-menus">tear-off-menus</a><br>
GTK+ 2 and Motif support Tear-off menus.&nbsp;&nbsp;These are sort of sticky menus or<br>
pop-up menus that are present all the time.&nbsp;&nbsp;If the resizing does not work<br>
correctly, this may be caused by using something like &quot;Vim*geometry&quot; in the<br>
defaults.&nbsp;&nbsp;Use &quot;Vim.geometry&quot; instead.<br>
<br>
As to GTK+ 3, tear-off menus have been deprecated since GTK+ 3.4.<br>
Accordingly, they are disabled if gvim is linked against GTK+ 3.4 or later.<br>
<br>
The Win32 GUI version emulates Motif's tear-off menus.&nbsp;&nbsp;Actually, a Motif user<br>
will spot the differences easily, but hopefully they're just as useful.&nbsp;&nbsp;You<br>
can also use the&nbsp;<a class="Identifier" href="gui_w32.html#:tearoff">:tearoff</a>&nbsp;command together with&nbsp;<a class="Identifier" href="gui.html#hidden-menus">hidden-menus</a>&nbsp;to create<br>
floating menus that do not appear on the main menu bar.<br>
<br>
<br>
5.2 Creating New Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#creating-menus" name="creating-menus">creating-menus</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:me" name=":me">:me</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:menu" name=":menu">:menu</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:noreme" name=":noreme">:noreme</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:noremenu" name=":noremenu">:noremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:am" name=":am">:am</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:amenu" name=":amenu">:amenu</a>&nbsp;<a class="Constant" href="gui.html#:an" name=":an">:an</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:anoremenu" name=":anoremenu">:anoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:nme" name=":nme">:nme</a>&nbsp;<a class="Constant" href="gui.html#:nmenu" name=":nmenu">:nmenu</a>&nbsp;<a class="Constant" href="gui.html#:nnoreme" name=":nnoreme">:nnoreme</a>&nbsp;<a class="Constant" href="gui.html#:nnoremenu" name=":nnoremenu">:nnoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:ome" name=":ome">:ome</a>&nbsp;<a class="Constant" href="gui.html#:omenu" name=":omenu">:omenu</a>&nbsp;<a class="Constant" href="gui.html#:onoreme" name=":onoreme">:onoreme</a>&nbsp;<a class="Constant" href="gui.html#:onoremenu" name=":onoremenu">:onoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:vme" name=":vme">:vme</a>&nbsp;<a class="Constant" href="gui.html#:vmenu" name=":vmenu">:vmenu</a>&nbsp;<a class="Constant" href="gui.html#:vnoreme" name=":vnoreme">:vnoreme</a>&nbsp;<a class="Constant" href="gui.html#:vnoremenu" name=":vnoremenu">:vnoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:xme" name=":xme">:xme</a>&nbsp;<a class="Constant" href="gui.html#:xmenu" name=":xmenu">:xmenu</a>&nbsp;<a class="Constant" href="gui.html#:xnoreme" name=":xnoreme">:xnoreme</a>&nbsp;<a class="Constant" href="gui.html#:xnoremenu" name=":xnoremenu">:xnoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:sme" name=":sme">:sme</a>&nbsp;<a class="Constant" href="gui.html#:smenu" name=":smenu">:smenu</a>&nbsp;<a class="Constant" href="gui.html#:snoreme" name=":snoreme">:snoreme</a>&nbsp;<a class="Constant" href="gui.html#:snoremenu" name=":snoremenu">:snoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:ime" name=":ime">:ime</a>&nbsp;<a class="Constant" href="gui.html#:imenu" name=":imenu">:imenu</a>&nbsp;<a class="Constant" href="gui.html#:inoreme" name=":inoreme">:inoreme</a>&nbsp;<a class="Constant" href="gui.html#:inoremenu" name=":inoremenu">:inoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:cme" name=":cme">:cme</a>&nbsp;<a class="Constant" href="gui.html#:cmenu" name=":cmenu">:cmenu</a>&nbsp;<a class="Constant" href="gui.html#:cnoreme" name=":cnoreme">:cnoreme</a>&nbsp;<a class="Constant" href="gui.html#:cnoremenu" name=":cnoremenu">:cnoremenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#E330" name="E330">E330</a>&nbsp;<a class="Constant" href="gui.html#E327" name="E327">E327</a>&nbsp;<a class="Constant" href="gui.html#E331" name="E331">E331</a>&nbsp;<a class="Constant" href="gui.html#E336" name="E336">E336</a>&nbsp;<a class="Constant" href="gui.html#E333" name="E333">E333</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#E328" name="E328">E328</a>&nbsp;<a class="Constant" href="gui.html#E329" name="E329">E329</a>&nbsp;<a class="Constant" href="gui.html#E337" name="E337">E337</a>&nbsp;<a class="Constant" href="gui.html#E792" name="E792">E792</a><br>
To create a new menu item, use the &quot;:menu&quot; commands.&nbsp;&nbsp;They are mostly like<br>
the &quot;:map&quot; set of commands but the first argument is a menu item name, given<br>
as a path of menus and submenus with a '.' between them, e.g.:<br>
<br>
<div class="helpExample">&nbsp;&nbsp; :menu File.Save&nbsp;&nbsp;:w&lt;CR&gt;<br>
&nbsp;&nbsp; :inoremenu File.Save&nbsp;&nbsp;&lt;C-O&gt;:w&lt;CR&gt;<br>
&nbsp;&nbsp; :menu Edit.Big\ Changes.Delete\ All\ Spaces&nbsp;&nbsp;:%s/[ ^I]//g&lt;CR&gt;</div>
<br>
This last one will create a new item in the menu bar called &quot;Edit&quot;, holding<br>
the mouse button down on this will pop up a menu containing the item<br>
&quot;Big Changes&quot;, which is a sub-menu containing the item &quot;Delete All Spaces&quot;,<br>
which when selected, performs the operation.<br>
<br>
Special characters in a menu name:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The next character is the shortcut key.&nbsp;&nbsp;Make sure each<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shortcut key is only used once in a (sub)menu.&nbsp;&nbsp;If you want to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert a literal &quot;&amp;&quot; in the menu name use &quot;&amp;&amp;&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;&nbsp; Separates the menu name from right-aligned text.&nbsp;&nbsp;This can be<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;used to show the equivalent typed command.&nbsp;&nbsp;The text &quot;<span class="Special">&lt;Tab&gt;</span>&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;can be used here for convenience.&nbsp;&nbsp;If you are using a real<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tab, don't forget to put a backslash before it!<br>
Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp; :amenu &amp;File.&amp;Open&lt;Tab&gt;:e&nbsp;&nbsp;:browse e&lt;CR&gt;</div>
<br>
[typed literally]<br>
With the shortcut &quot;F&quot; (while keeping the&nbsp;<span class="Special">&lt;Alt&gt;</span>&nbsp;key pressed), and then &quot;O&quot;,<br>
this menu can be used.&nbsp;&nbsp;The second part is shown as &quot;Open&nbsp;&nbsp;&nbsp;&nbsp; :e&quot;.&nbsp;&nbsp;The &quot;:e&quot;<br>
is right aligned, and the &quot;O&quot; is underlined, to indicate it is the shortcut.<br>
<br>
The &quot;:amenu&quot; command can be used to define menu entries for all modes at once.<br>
To make the command work correctly, a character is automatically inserted for<br>
some modes:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inserted&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appended</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nothing&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nothing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visual&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-C&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-\&gt;&lt;C-G&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-\&gt;&lt;C-O&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cmdline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-C&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-\&gt;&lt;C-G&gt;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Op-pending&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-C&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">&lt;C-\&gt;&lt;C-G&gt;</span><br>
<br>
Appending&nbsp;<span class="Special">CTRL-\</span>&nbsp;<span class="Special">CTRL-G</span>&nbsp;is for going back to insert mode when&nbsp;<a class="Type" href="options.html#'insertmode'">'insertmode'</a>&nbsp;is<br>
set.&nbsp;<a class="Identifier" href="intro.html#CTRL-\_CTRL-G">CTRL-\_CTRL-G</a><br>
<br>
Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp; :amenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; :next^M</div>
<br>
is equal to:<br>
<br>
<div class="helpExample">&nbsp;&nbsp; :nmenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; :next^M<br>
&nbsp;&nbsp; :vmenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; ^C:next^M^\^G<br>
&nbsp;&nbsp; :imenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; ^\^O:next^M<br>
&nbsp;&nbsp; :cmenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; ^C:next^M^\^G<br>
&nbsp;&nbsp; :omenu File.Next&nbsp;&nbsp;&nbsp;&nbsp; ^C:next^M^\^G</div>
<br>
Careful: In Insert mode this only works for a SINGLE Normal mode command,<br>
because of the&nbsp;<span class="Special">CTRL-O</span>.&nbsp;&nbsp;If you have two or more commands, you will need to use<br>
the &quot;:imenu&quot; command.&nbsp;&nbsp;For inserting text in any mode, you can use the<br>
expression register:<br>
<br>
<div class="helpExample">&nbsp;&nbsp; :amenu Insert.foobar&nbsp;&nbsp; &quot;='foobar'&lt;CR&gt;P</div>
<br>
<span class="Todo">Note</span>&nbsp;that the '&lt;' and 'k' flags in&nbsp;<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>&nbsp;also apply here (when<br>
included they make the &lt;&gt; form and raw key codes not being recognized).<br>
<br>
<span class="Todo">Note</span>&nbsp;that&nbsp;<span class="Special">&lt;Esc&gt;</span>&nbsp;in Cmdline mode executes the command, like in a mapping.&nbsp;&nbsp;This<br>
is Vi compatible.&nbsp;&nbsp;Use&nbsp;<span class="Special">CTRL-C</span>&nbsp;to quit Cmdline mode.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:menu-<silent>" name=":menu-&lt;silent&gt;">:menu-&lt;silent&gt;</a>&nbsp;<a class="Constant" href="gui.html#:menu-silent" name=":menu-silent">:menu-silent</a><br>
To define a menu which will not be echoed on the command line, add<br>
&quot;<span class="Special">&lt;silent&gt;</span>&quot; as the first argument.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu &lt;silent&gt; Settings.Ignore\ case&nbsp;&nbsp;:set ic&lt;CR&gt;</div>
The &quot;:set ic&quot; will not be echoed when using this menu.&nbsp;&nbsp;Messages from the<br>
executed command are still given though.&nbsp;&nbsp;To shut them up too, add a &quot;:silent&quot;<br>
in the executed command:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu &lt;silent&gt; Search.Header :exe &quot;:silent normal /Header\r&quot;&lt;CR&gt;</div>
&quot;<span class="Special">&lt;silent&gt;</span>&quot; may also appear just after &quot;<span class="Special">&lt;special&gt;</span>&quot; or &quot;<span class="Special">&lt;script&gt;</span>&quot;.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:menu-<special>" name=":menu-&lt;special&gt;">:menu-&lt;special&gt;</a>&nbsp;<a class="Constant" href="gui.html#:menu-special" name=":menu-special">:menu-special</a><br>
Define a menu with &lt;&gt; notation for special keys, even though the &quot;&lt;&quot; flag<br>
may appear in&nbsp;<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>.&nbsp;&nbsp;This is useful if the side effect of setting<br>
<a class="Type" href="options.html#'cpoptions'">'cpoptions'</a>&nbsp;is not desired.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu &lt;special&gt; Search.Header /Header&lt;CR&gt;</div>
&quot;<span class="Special">&lt;special&gt;</span>&quot; must appear as the very first argument to the &quot;:menu&quot; command or<br>
just after &quot;<span class="Special">&lt;silent&gt;</span>&quot; or &quot;<span class="Special">&lt;script&gt;</span>&quot;.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:menu-<script>" name=":menu-&lt;script&gt;">:menu-&lt;script&gt;</a>&nbsp;<a class="Constant" href="gui.html#:menu-script" name=":menu-script">:menu-script</a><br>
The &quot;to&quot; part of the menu will be inspected for mappings.&nbsp;&nbsp;If you don't want<br>
this, use the &quot;:noremenu&quot; command (or the similar one for a specific mode).<br>
If you do want to use script-local mappings, add &quot;<span class="Special">&lt;script&gt;</span>&quot; as the very first<br>
argument to the &quot;:menu&quot; command or just after &quot;<span class="Special">&lt;silent&gt;</span>&quot; or &quot;<span class="Special">&lt;special&gt;</span>&quot;.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#menu-priority" name="menu-priority">menu-priority</a><br>
You can give a priority to a menu.&nbsp;&nbsp;Menus with a higher priority go more to<br>
the right.&nbsp;&nbsp;The priority is given as a number before the &quot;:menu&quot; command.<br>
Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:80menu Buffer.next :bn&lt;CR&gt;</div>
<br>
The default menus have these priorities:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tools&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 40<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Syntax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;70<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9999<br>
<br>
When no or zero priority is given, 500 is used.<br>
The priority for the PopUp menu is not used.<br>
<br>
The Help menu will be placed on the far right side of the menu bar on systems<br>
which support this (Motif and GTK+).&nbsp;&nbsp;For GTK+ 2 and 3, this is not done<br>
anymore because right-aligning the Help menu is now discouraged UI design.<br>
<br>
You can use a priority higher than 9999, to make it go after the Help menu,<br>
but that is non-standard and is discouraged.&nbsp;&nbsp;The highest possible priority is<br>
about 32000.&nbsp;&nbsp;The lowest is 1.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#sub-menu-priority" name="sub-menu-priority">sub-menu-priority</a><br>
The same mechanism can be used to position a sub-menu.&nbsp;&nbsp;The priority is then<br>
given as a dot-separated list of priorities, before the menu name:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu 80.500 Buffer.next :bn&lt;CR&gt;</div>
Giving the sub-menu priority is only needed when the item is not to be put<br>
in a normal position.&nbsp;&nbsp;For example, to put a sub-menu before the other items:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu 80.100 Buffer.first :brew&lt;CR&gt;</div>
Or to put a sub-menu after the other items, and further items with default<br>
priority will be put before it:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu 80.900 Buffer.last :blast&lt;CR&gt;</div>
When a number is missing, the default value 500 will be used:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu .900 myMenu.test :echo &quot;text&quot;&lt;CR&gt;</div>
The menu priority is only used when creating a new menu.&nbsp;&nbsp;When it already<br>
existed, e.g., in another mode, the priority will not change.&nbsp;&nbsp;Thus, the<br>
priority only needs to be given the first time a menu is used.<br>
An exception is the PopUp menu.&nbsp;&nbsp;There is a separate menu for each mode<br>
(Normal, Op-pending, Visual, Insert, Cmdline).&nbsp;&nbsp;The order in each of these<br>
menus can be different.&nbsp;&nbsp;This is different from menu-bar menus, which have<br>
the same order for all modes.<br>
<span class="Todo">NOTE</span>: sub-menu priorities currently don't work for all versions of the GUI.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#menu-separator" name="menu-separator">menu-separator</a>&nbsp;<a class="Constant" href="gui.html#E332" name="E332">E332</a><br>
Menu items can be separated by a special item that inserts some space between<br>
items.&nbsp;&nbsp;Depending on the system this is displayed as a line or a dotted line.<br>
These items must start with a '-' and end in a '-'.&nbsp;&nbsp;The part in between is<br>
used to give it a unique name.&nbsp;&nbsp;Priorities can be used as with normal items.<br>
Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu Example.item1&nbsp;&nbsp;&nbsp;&nbsp; :do something<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu Example.-Sep-&nbsp;&nbsp;&nbsp;&nbsp; :<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu Example.item2&nbsp;&nbsp;&nbsp;&nbsp; :do something different</div>
<span class="Todo">Note</span>&nbsp;that the separator also requires a rhs.&nbsp;&nbsp;It doesn't matter what it is,<br>
because the item will never be selected.&nbsp;&nbsp;Use a single colon to keep it<br>
simple.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-toolbar" name="gui-toolbar">gui-toolbar</a><br>
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),<br>
and Photon GUI.&nbsp;&nbsp;It should turn up in other GUIs in due course.&nbsp;&nbsp;The<br>
default toolbar is setup in menu.vim.<br>
The display of the toolbar is controlled by the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>&nbsp;letter 'T'.&nbsp;&nbsp;You<br>
can thus have menu &amp; toolbar together, or either on its own, or neither.<br>
The appearance is controlled by the&nbsp;<a class="Type" href="options.html#'toolbar'">'toolbar'</a>&nbsp;option.&nbsp;&nbsp;You can choose between<br>
an image, text or both.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#toolbar-icon" name="toolbar-icon">toolbar-icon</a><br>
The toolbar is defined as a special menu called ToolBar, which only has one<br>
level.&nbsp;&nbsp;Vim interprets the items in this menu as follows:<br>
1)&nbsp;&nbsp;If an &quot;icon=&quot; argument was specified, the file with this name is used.<br>
&nbsp;&nbsp;&nbsp;&nbsp;The file can either be specified with the full path or with the base name.<br>
&nbsp;&nbsp;&nbsp;&nbsp;In the last case it is searched for in the &quot;bitmaps&quot; directory in<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a class="Type" href="options.html#'runtimepath'">'runtimepath'</a>, like in point 3.&nbsp;&nbsp;Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu icon=/usr/local/pixmaps/foo_icon.xpm ToolBar.Foo :echo &quot;Foo&quot;&lt;CR&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu icon=FooIcon ToolBar.Foo :echo &quot;Foo&quot;&lt;CR&gt;</div>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that in the first case the extension is included, while in the second<br>
&nbsp;&nbsp;&nbsp;&nbsp;case it is omitted.<br>
&nbsp;&nbsp;&nbsp;&nbsp;If the file cannot be opened the next points are tried.<br>
&nbsp;&nbsp;&nbsp;&nbsp;A space in the file name must be escaped with a backslash.<br>
&nbsp;&nbsp;&nbsp;&nbsp;A menu priority must come _after_ the icon argument:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu icon=foo 1.42 ToolBar.Foo :echo &quot;42!&quot;&lt;CR&gt;</div>
2)&nbsp;&nbsp;An item called 'BuiltIn##', where ## is a number, is taken as number ## of<br>
&nbsp;&nbsp;&nbsp;&nbsp;the built-in bitmaps available in Vim.&nbsp;&nbsp;Currently there are 31 numbered<br>
&nbsp;&nbsp;&nbsp;&nbsp;from 0 to 30 which cover most common editing operations&nbsp;<a class="Identifier" href="gui.html#builtin-tools">builtin-tools</a>.<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu ToolBar.BuiltIn22 :call SearchNext(&quot;back&quot;)&lt;CR&gt;</div>
3)&nbsp;&nbsp;An item with another name is first searched for in the directory<br>
&nbsp;&nbsp;&nbsp;&nbsp;&quot;bitmaps&quot; in&nbsp;<a class="Type" href="options.html#'runtimepath'">'runtimepath'</a>.&nbsp;&nbsp;If found, the bitmap file is used as the<br>
&nbsp;&nbsp;&nbsp;&nbsp;toolbar button image.&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that the exact filename is OS-specific: For<br>
&nbsp;&nbsp;&nbsp;&nbsp;example, under Win32 the command<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu ToolBar.Hello :echo &quot;hello&quot;&lt;CR&gt;</div>
&nbsp;&nbsp;&nbsp; would find the file 'hello.bmp'.&nbsp;&nbsp;Under GTK+/X11 it is 'Hello.xpm'.&nbsp;&nbsp;With<br>
&nbsp;&nbsp;&nbsp;&nbsp;GTK+ 2 the files 'Hello.png', 'Hello.xpm' and 'Hello.bmp' are checked for<br>
&nbsp;&nbsp;&nbsp;&nbsp;existence, and the first one found would be used.<br>
&nbsp;&nbsp;&nbsp;&nbsp;For MS-Windows and GTK+ 2 the bitmap is scaled to fit the button.&nbsp;&nbsp;For<br>
&nbsp;&nbsp;&nbsp;&nbsp;MS-Windows a size of 18 by 18 pixels works best.<br>
&nbsp;&nbsp;&nbsp;&nbsp;For MS-Windows the bitmap should have 16 colors with the standard palette.<br>
&nbsp;&nbsp;&nbsp;&nbsp;The light grey pixels will be changed to the Window frame color and the<br>
&nbsp;&nbsp;&nbsp;&nbsp;dark grey pixels to the window shadow color.&nbsp;&nbsp;More colors might also work,<br>
&nbsp;&nbsp;&nbsp;&nbsp;depending on your system.<br>
4)&nbsp;&nbsp;If the bitmap is still not found, Vim checks for a match against its list<br>
&nbsp;&nbsp;&nbsp;&nbsp;of built-in names.&nbsp;&nbsp;Each built-in button image has a name.<br>
&nbsp;&nbsp;&nbsp;&nbsp;So the command<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu ToolBar.Open :e</div>
&nbsp;&nbsp;&nbsp; will show the built-in &quot;open a file&quot; button image if no open.bmp exists.<br>
&nbsp;&nbsp;&nbsp;&nbsp;All the built-in names can be seen used in menu.vim.<br>
5)&nbsp;&nbsp;If all else fails, a blank, but functioning, button is displayed.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#builtin-tools" name="builtin-tools">builtin-tools</a><br>
<span class="PreProc">nr&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normal action&nbsp;</span><br>
00&nbsp;&nbsp;New&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open new window<br>
01&nbsp;&nbsp;Open&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;browse for file to open in current window<br>
02&nbsp;&nbsp;Save&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write buffer to file<br>
03&nbsp;&nbsp;Undo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;undo last change<br>
04&nbsp;&nbsp;Redo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;redo last undone change<br>
05&nbsp;&nbsp;Cut&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; delete selected text to clipboard<br>
06&nbsp;&nbsp;Copy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copy selected text to clipboard<br>
07&nbsp;&nbsp;Paste&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; paste text from clipboard<br>
08&nbsp;&nbsp;Print&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print current buffer<br>
09&nbsp;&nbsp;Help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;open a buffer on Vim's builtin help<br>
10&nbsp;&nbsp;Find&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start a search command<br>
11&nbsp;&nbsp;SaveAll&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write all modified buffers to file<br>
12&nbsp;&nbsp;SaveSesn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write session file for current situation<br>
13&nbsp;&nbsp;NewSesn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write new session file<br>
14&nbsp;&nbsp;LoadSesn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;load session file<br>
15&nbsp;&nbsp;RunScript&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browse for file to run as a Vim script<br>
16&nbsp;&nbsp;Replace&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prompt for substitute command<br>
17&nbsp;&nbsp;WinClose&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close current window<br>
18&nbsp;&nbsp;WinMax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make current window use many lines<br>
19&nbsp;&nbsp;WinMin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make current window use few lines<br>
20&nbsp;&nbsp;WinSplit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;split current window<br>
21&nbsp;&nbsp;Shell&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start a shell<br>
22&nbsp;&nbsp;FindPrev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;search again, backward<br>
23&nbsp;&nbsp;FindNext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;search again, forward<br>
24&nbsp;&nbsp;FindHelp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prompt for word to search help for<br>
25&nbsp;&nbsp;Make&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;run make and jump to first error<br>
26&nbsp;&nbsp;TagJump&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jump to tag under the cursor<br>
27&nbsp;&nbsp;RunCtags&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;build tags for files in current directory<br>
28&nbsp;&nbsp;WinVSplit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; split current window vertically<br>
29&nbsp;&nbsp;WinMaxWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make current window use many columns<br>
30&nbsp;&nbsp;WinMinWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make current window use few columns<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#hidden-menus" name="hidden-menus">hidden-menus</a>&nbsp;<a class="Constant" href="gui.html#win32-hidden-menus" name="win32-hidden-menus">win32-hidden-menus</a><br>
In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu<br>
from the main menu bar.&nbsp;&nbsp;You must then use the&nbsp;<a class="Identifier" href="gui.html#:popup">:popup</a>&nbsp;or&nbsp;<a class="Identifier" href="gui_w32.html#:tearoff">:tearoff</a>&nbsp;command<br>
to display it.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#popup-menu" name="popup-menu">popup-menu</a><br>
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the<br>
special menu &quot;PopUp&quot;.&nbsp;&nbsp;This is the menu that is displayed when the right mouse<br>
button is pressed, if&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;is set to popup or popup_setpos.<br>
<br>
<br>
5.3 Showing What Menus Are Mapped To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#showing-menus" name="showing-menus">showing-menus</a><br>
<br>
To see what an existing menu is mapped to, use just one argument after the<br>
menu commands (just like you would with the &quot;:map&quot; commands).&nbsp;&nbsp;If the menu<br>
specified is a submenu, then all menus under that hierarchy will be shown.<br>
If no argument is given after :menu at all, then ALL menu items are shown<br>
for the appropriate mode (e.g., Command-line mode for :cmenu).<br>
<br>
Special characters in the list, just before the rhs:<br>
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The menu was defined with &quot;nore&quot; to disallow remapping.<br>
&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The menu was defined with &quot;<span class="Special">&lt;script&gt;</span>&quot; to allow remapping script-local<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mappings only.<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The menu was disabled.<br>
<br>
<span class="Todo">Note</span>&nbsp;that hitting&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;while entering a menu name after a menu command may<br>
be used to complete the name of the menu item.<br>
<br>
<br>
5.4 Executing Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#execute-menus" name="execute-menus">execute-menus</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:em" name=":em">:em</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:emenu" name=":emenu">:emenu</a>&nbsp;<a class="Constant" href="gui.html#E334" name="E334">E334</a>&nbsp;<a class="Constant" href="gui.html#E335" name="E335">E335</a><br>
:<span class="Special">[range]</span>em[enu]&nbsp;<span class="Special">{menu}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute&nbsp;<span class="Special">{menu}</span>&nbsp;from the command line.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default is to execute the Normal mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;menu.&nbsp;&nbsp;If a range is specified, it executes<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the Visual mode menu.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If used from&nbsp;<span class="Special">&lt;c-o&gt;</span>, it executes the<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert-mode menu Eg:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:emenu File.Exit</div>
<br>
If the console-mode vim has been compiled with WANT_MENU defined, you can<br>
use :emenu to access useful menu items you may have got used to from GUI<br>
mode.&nbsp;&nbsp;See&nbsp;<a class="Type" href="options.html#'wildmenu'">'wildmenu'</a>&nbsp;for an option that works well with this.&nbsp;&nbsp;See<br>
<a class="Identifier" href="gui.html#console-menus">console-menus</a>&nbsp;for an example.<br>
<br>
When using a range, if the lines match with '&lt;,'&gt;, then the menu is executed<br>
using the last visual selection.<br>
<br>
<br>
5.5 Deleting Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#delete-menus" name="delete-menus">delete-menus</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:unme" name=":unme">:unme</a>&nbsp;&nbsp;<a class="Constant" href="gui.html#:unmenu" name=":unmenu">:unmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:aun" name=":aun">:aun</a>&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:aunmenu" name=":aunmenu">:aunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:nunme" name=":nunme">:nunme</a>&nbsp;<a class="Constant" href="gui.html#:nunmenu" name=":nunmenu">:nunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:ounme" name=":ounme">:ounme</a>&nbsp;<a class="Constant" href="gui.html#:ounmenu" name=":ounmenu">:ounmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:vunme" name=":vunme">:vunme</a>&nbsp;<a class="Constant" href="gui.html#:vunmenu" name=":vunmenu">:vunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:xunme" name=":xunme">:xunme</a>&nbsp;<a class="Constant" href="gui.html#:xunmenu" name=":xunmenu">:xunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:sunme" name=":sunme">:sunme</a>&nbsp;<a class="Constant" href="gui.html#:sunmenu" name=":sunmenu">:sunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:iunme" name=":iunme">:iunme</a>&nbsp;<a class="Constant" href="gui.html#:iunmenu" name=":iunmenu">:iunmenu</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:cunme" name=":cunme">:cunme</a>&nbsp;<a class="Constant" href="gui.html#:cunmenu" name=":cunmenu">:cunmenu</a><br>
To delete a menu item or a whole submenu, use the unmenu commands, which are<br>
analogous to the unmap commands.&nbsp;&nbsp;Eg:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;:unmenu! Edit.Paste</div>
<br>
This will remove the Paste item from the Edit menu for Insert and<br>
Command-line modes.<br>
<br>
<span class="Todo">Note</span>&nbsp;that hitting&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;while entering a menu name after an umenu command<br>
may be used to complete the name of the menu item for the appropriate mode.<br>
<br>
To remove all menus use:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:unmenu-all" name=":unmenu-all">:unmenu-all</a>&nbsp;<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:unmenu *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; remove all menus in Normal and visual mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:unmenu! *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; remove all menus in Insert and Command-line mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:aunmenu *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; remove all menus in all modes</div>
<br>
If you want to get rid of the menu bar:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guioptions-=m</div>
<br>
<br>
5.6 Disabling Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#disable-menus" name="disable-menus">disable-menus</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:menu-disable" name=":menu-disable">:menu-disable</a>&nbsp;<a class="Constant" href="gui.html#:menu-enable" name=":menu-enable">:menu-enable</a><br>
If you do not want to remove a menu, but disable it for a moment, this can be<br>
done by adding the &quot;enable&quot; or &quot;disable&quot; keyword to a &quot;:menu&quot; command.<br>
Examples:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu disable &amp;File.&amp;Open\.\.\.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu enable *<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu disable &amp;Tools.*</div>
<br>
The command applies to the modes as used with all menu commands.&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that<br>
characters like &quot;&amp;&quot; need to be included for translated names to be found.<br>
When the argument is &quot;*&quot;, all menus are affected.&nbsp;&nbsp;Otherwise the given menu<br>
name and all existing submenus below it are affected.<br>
<br>
<br>
5.7 Examples for Menus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#menu-examples" name="menu-examples">menu-examples</a><br>
<br>
Here is an example on how to add menu items with menu's!&nbsp;&nbsp;You can add a menu<br>
item for the keyword under the cursor.&nbsp;&nbsp;The register &quot;z&quot; is used.<br>
<br>
<div class="helpExample">&nbsp;&nbsp;:nmenu Words.Add\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wb&quot;zye:menu! Words.&lt;C-R&gt;z &lt;C-R&gt;z&lt;CR&gt;<br>
&nbsp;&nbsp;:nmenu Words.Remove\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wb&quot;zye:unmenu! Words.&lt;C-R&gt;z&lt;CR&gt;<br>
&nbsp;&nbsp;:vmenu Words.Add\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;zy:menu! Words.&lt;C-R&gt;z &lt;C-R&gt;z &lt;CR&gt;<br>
&nbsp;&nbsp;:vmenu Words.Remove\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;zy:unmenu! Words.&lt;C-R&gt;z&lt;CR&gt;<br>
&nbsp;&nbsp;:imenu Words.Add\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Esc&gt;wb&quot;zye:menu! Words.&lt;C-R&gt;z &lt;C-R&gt;z&lt;CR&gt;a<br>
&nbsp;&nbsp;:imenu Words.Remove\ Var&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Esc&gt;wb&quot;zye:unmenu! Words.&lt;C-R&gt;z&lt;CR&gt;a</div>
<br>
(the rhs is in &lt;&gt; notation, you can copy/paste this text to try out the<br>
mappings, or put these lines in your gvimrc; &quot;<span class="Special">&lt;C-R&gt;</span>&quot; is&nbsp;<span class="Special">CTRL-R</span>, &quot;<span class="Special">&lt;CR&gt;</span>&quot; is<br>
the&nbsp;<span class="Special">&lt;CR&gt;</span>&nbsp;key.&nbsp;&nbsp;<a class="Identifier" href="intro.html#<>">&lt;&gt;</a>)<br>
<br>
<br>
5.8 Tooltips &amp; Menu tips<br>
<br>
See section&nbsp;<a class="Identifier" href="usr_42.html#42.4">42.4</a>&nbsp;in the user manual.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:tmenu" name=":tmenu">:tmenu</a>&nbsp;<a class="Constant" href="gui.html#:tm" name=":tm">:tm</a><br>
:tm[enu]&nbsp;<span class="Special">{menupath}</span>&nbsp;<span class="Special">{rhs}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Define a tip for a menu or tool.&nbsp;&nbsp;<span class="Special">{only in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">X11 and Win32 GUI}</span><br>
<br>
:tm[enu]&nbsp;<span class="Special">[menupath]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; List menu tips.&nbsp;<span class="Special">{only in X11 and Win32 GUI}</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:tunmenu" name=":tunmenu">:tunmenu</a>&nbsp;<a class="Constant" href="gui.html#:tu" name=":tu">:tu</a><br>
:tu[nmenu]&nbsp;<span class="Special">{menupath}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remove a tip for a menu or tool.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{only in X11 and Win32 GUI}</span><br>
<br>
When a tip is defined for a menu item, it appears in the command-line area<br>
when the mouse is over that item, much like a standard Windows menu hint in<br>
the status bar.&nbsp;&nbsp;(Except when Vim is in Command-line mode, when of course<br>
nothing is displayed.)<br>
When a tip is defined for a ToolBar item, it appears as a tooltip when the<br>
mouse pauses over that button, in the usual fashion.&nbsp;&nbsp;Use the&nbsp;<a class="Identifier" href="syntax.html#hl-Tooltip">hl-Tooltip</a><br>
highlight group to change its colors.<br>
<br>
A &quot;tip&quot; can be defined for each menu item.&nbsp;&nbsp;For example, when defining a menu<br>
item like this:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu MyMenu.Hello :echo &quot;Hello&quot;&lt;CR&gt;</div>
The tip is defined like this:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:tmenu MyMenu.Hello Displays a greeting.</div>
And delete it with:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:tunmenu MyMenu.Hello</div>
<br>
Tooltips are currently only supported for the X11 and Win32 GUI.&nbsp;&nbsp;However, they<br>
should appear for the other gui platforms in the not too distant future.<br>
<br>
The &quot;:tmenu&quot; command works just like other menu commands, it uses the same<br>
arguments.&nbsp;&nbsp;&quot;:tunmenu&quot; deletes an existing menu tip, in the same way as the<br>
other unmenu commands.<br>
<br>
If a menu item becomes invalid (i.e. its actions in all modes are deleted) Vim<br>
deletes the menu tip (and the item) for you.&nbsp;&nbsp;This means that :aunmenu deletes<br>
a menu item - you don't need to do a :tunmenu as well.<br>
<br>
<br>
5.9 Popup Menus<br>
<br>
In the Win32 and GTK+ GUI, you can cause a menu to popup at the cursor.<br>
This behaves similarly to the PopUp menus except that any menu tree can<br>
be popped up.<br>
<br>
This command is for backwards compatibility, using it is discouraged, because<br>
it behaves in a strange way.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#:popup" name=":popup">:popup</a>&nbsp;<a class="Constant" href="gui.html#:popu" name=":popu">:popu</a><br>
:popu[p]&nbsp;<span class="Special">{name}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Popup the menu&nbsp;<span class="Special">{name}</span>.&nbsp;&nbsp;The menu named must<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;have at least one subentry, but need not<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appear on the menu-bar (see&nbsp;<a class="Identifier" href="gui.html#hidden-menus">hidden-menus</a>).<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">{only available for Win32 and GTK GUI}</span><br>
<br>
:popu[p]!&nbsp;<span class="Special">{name}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Like above, but use the position of the mouse<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pointer instead of the cursor.<br>
<br>
Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:popup File</div>
will make the &quot;File&quot; menu (if there is one) appear at the text cursor (mouse<br>
pointer if ! was used).<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu ]Toolbar.Make&nbsp;&nbsp;&nbsp;&nbsp;:make&lt;CR&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:popup ]Toolbar</div>
This creates a popup menu that doesn't exist on the main menu-bar.<br>
<br>
<span class="Todo">Note</span>&nbsp;that a menu that starts with ']' will not be displayed.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. Extras&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-extras" name="gui-extras">gui-extras</a><br>
<br>
This section describes other features which are related to the GUI.<br>
<br>
- With the GUI, there is no wait for one second after hitting escape, because<br>
&nbsp;&nbsp;the key codes don't start with&nbsp;<span class="Special">&lt;Esc&gt;</span>.<br>
<br>
- Typing ^V followed by a special key in the GUI will insert &quot;<span class="Special">&lt;Key&gt;</span>&quot;, since<br>
&nbsp;&nbsp;the internal string used is meaningless.&nbsp;&nbsp;Modifiers may also be held down to<br>
&nbsp;&nbsp;get &quot;<span class="Special">&lt;Modifiers-Key&gt;</span>&quot;.<br>
<br>
- In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within<br>
&nbsp;&nbsp;mappings of special keys and mouse events.&nbsp;&nbsp;E.g.: :map&nbsp;<span class="Special">&lt;M-LeftDrag&gt;</span>&nbsp;<span class="Special">&lt;LeftDrag&gt;</span><br>
<br>
- In the GUI, several normal keys may have modifiers in mappings etc, these<br>
&nbsp;&nbsp;are&nbsp;<span class="Special">&lt;Space&gt;</span>,&nbsp;<span class="Special">&lt;Tab&gt;</span>,&nbsp;<span class="Special">&lt;NL&gt;</span>,&nbsp;<span class="Special">&lt;CR&gt;</span>,&nbsp;<span class="Special">&lt;Esc&gt;</span>.<br>
<br>
- To check in a Vim script if the GUI is being used, you can use something<br>
&nbsp;&nbsp;like this:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if has(&quot;gui_running&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;yes, we have a GUI&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;Boring old console&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endif</div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#setting-guifont" name="setting-guifont">setting-guifont</a><br>
- When you use the same vimrc file on various systems, you can use something<br>
&nbsp;&nbsp;like this to set options specifically for each type of GUI:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if has(&quot;gui_running&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if has(&quot;gui_gtk2&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guifont=Luxi\ Mono\ 12<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif has(&quot;x11&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; Also for GTK 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guifont=*-lucidatypewriter-medium-r-normal-*-*-180-*-*-m-*-*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elseif has(&quot;gui_win32&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guifont=Luxi_Mono:h12:cANSI<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endif<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endif</div>
<br>
A recommended Japanese font is MS Mincho.&nbsp;&nbsp;You can find info here:<br>
<span class="Constant"><a href="http://www.lexikan.com/mincho.htm">http://www.lexikan.com/mincho.htm</a></span><br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. Shell Commands&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui.html#gui-shell" name="gui-shell">gui-shell</a><br>
<br>
For the X11 GUI the external commands are executed inside the gvim window.<br>
See&nbsp;<a class="Identifier" href="gui_x11.html#gui-pty">gui-pty</a>.<br>
<br>
WARNING: Executing an external command from the X11 GUI will not always<br>
work.&nbsp;&nbsp;&quot;normal&quot; commands like &quot;ls&quot;, &quot;grep&quot; and &quot;make&quot; mostly work fine.<br>
Commands that require an intelligent terminal like &quot;less&quot; and &quot;ispell&quot; won't<br>
work.&nbsp;&nbsp;Some may even hang and need to be killed from another terminal.&nbsp;&nbsp;So be<br>
careful!<br>
<br>
For the Win32 GUI the external commands are executed in a separate window.<br>
See&nbsp;<a class="Identifier" href="gui_w32.html#gui-shell-win32">gui-shell-win32</a>.<br>
<br>
&nbsp;vim:tw=78:sw=4:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
